package dto

type IMCreateReqDto struct {
	Name            string `json:"name" comment:"群名" validate:"required"`
	TenantId        string `json:"tenant_id" comment:"租户id" validate:"required"`
	GroupId         string `json:"group_id" comment:"群组id" validate:"required"`
	RoomType        string `json:"room_type" comment:"群组id"`
	Notification    string `json:"notification" comment:"群公告"`
	ApplyJoinOption string `json:"apply_join_option" comment:"申请加群处理方式。包含 FreeAccess（自由加入），NeedPermission（需要验证），DisableApply（禁止加群），不填默认为 NeedPermission（需要验证） 仅当创建支持申请加群的群组时，该字段有效"`
}

type IMCreateResDto struct {
	GroupId string `json:"group_id" comment:"群组id"`
}

type IMDestroyReqDto struct {
	TenantId string `json:"tenant_id" comment:"租户id" validate:"required"`
	GroupId  string `json:"group_id" comment:"群组id" validate:"required"`
}

type MultiNoSpeakReqDto struct {
	TenantId       string   `json:"tenant_id" comment:"租户" validate:"required"`
	GroupId        string   `json:"group_id" comment:"群组id" validate:"required"`
	MembersAccount []string `json:"members_account" comment:"禁言或取消禁言成员列表" validate:"required"`
	MuteTime       int      `json:"mute_time" comment:"单位为秒，为0时表示取消禁言，4294967295为永久禁言。" validate:"gte=0"`
}

type GetUserSignReqDto struct {
	TenantId string `json:"tenant_id" comment:"租户" validate:"required"`
	UserId   string `json:"user_id" comment:"用户"`
}

type GetUserSignResDto struct {
	TenantId string `json:"tenant_id" comment:"租户"`
	UserId   string `json:"user_id" comment:"用户"`
	AppId    int64  `json:"app_id" comment:"appid"`
	UserSign string `json:"user_sign" comment:"签名"`
}

type GetGroupInfoReqDto struct {
	TenantId string   `json:"tenant_id" comment:"租户" validate:"required"`
	GroupIds []string `json:"group_ids" comment:"群组id" validate:"required"`
}

type GroupInfoResDto struct {
	GroupId         string   `json:"GroupId"`
	Type            string   `json:"Type"`
	Name            string   `json:"Name"`
	Appid           int64    `json:"Appid"`
	Introduction    string   `json:"Introduction"`
	Notification    string   `json:"Notification"`
	FaceUrl         string   `json:"FaceUrl"`
	OwnerAccount    string   `json:"Owner_Account"`
	CreateTime      int64    `json:"CreateTime"`
	LastInfoTime    int64    `json:"LastInfoTime"`
	LastMsgTime     int64    `json:"LastMsgTime"`
	NextMsgSeq      int64    `json:"NextMsgSeq"`
	MemberNum       int64    `json:"MemberNum"`
	MaxMemberNum    int64    `json:"MaxMemberNum"`
	ApplyJoinOption string   `json:"ApplyJoinOption"`
	MuteAllMember   string   `json:"MuteAllMember"`
	MemberList      []Member `json:"member_list"`
}

type Member struct {
	Account string `json:"member_account"` //成员
	Role    string `json:"role"`           //角色
}
